/* -------------------------------------------------------------------------
*  This file is part of the Cantian project.
* Copyright (c) 2024 Huawei Technologies Co.,Ltd.
*
* Cantian is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
*          http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
* -------------------------------------------------------------------------
*
* cm_dbs_snapshot.h
*
*
* IDENTIFICATION
* src/common/cm_dbs_snapshot.h
*
* -------------------------------------------------------------------------
*/

#ifndef CANTIANDB_CM_DBS_SNAPSHOT_H
#define CANTIANDB_CM_DBS_SNAPSHOT_H

#include "cm_defs.h"
#include "cm_dbstor.h"
#include "cm_dbs_file.h"

status_t cm_dbs_create_fs_snap(char *name, uint32 v_storId, snapshot_result_info* snap_info);
status_t cm_dbs_get_page_from_fs_snap(char *name, uint32_t vstor_id, char *snap_name, char *buffer, char *buffer_len);
status_t cm_dbs_create_snapshot_file(int32 *handle, const char *file_name);
status_t cm_dbs_write_snapshot_file(int32 handle, int64 offset, const void *buf, int32 size);
status_t cm_dbs_create_fs_snap_diff_session(const char *name, uint32 v_storId);
status_t cm_dbs_delete_fs_snap_diff_session(const char *name, uint32 v_storId);
status_t cm_dbs_delete_fs_snap(const char *name, uint32 v_storId);
status_t cm_dbs_query_file_diff_between_fs_snaps(const char *name, uint32 v_storId, char *diff);


#endif  // CANTIANDB_CM_DBS_SNAPSHOT_H
